home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / ptv1n2.arc / BSOUND.BAS < prev    next >
BASIC Source File  |  1990-06-14  |  922b  |  42 lines

  1. '**** BSOUND.BAS - demonstrates BSound for PC Techniques
  2.  
  3. 'Copyright (c) 1990 Ethan Winer
  4.  
  5.  
  6. DEFINT A-Z
  7.  
  8. PRINT "First let's make an outer-space sound"
  9. FOR X = 1 TO 6
  10.     FOR Y = 1 TO 2
  11.         CALL BSound(Y * 100, 1)
  12.         CALL BSound(1000 - Y * 10, 1)
  13.     NEXT
  14. NEXT
  15. PRINT "No big deal, right?"
  16.  
  17. CALL Pause(20)
  18.  
  19. PRINT "Okay, so now we'll play a familiar tune"
  20. FOR X = 1 TO 10
  21.     READ Frequency, Duration
  22.     CALL BSound(Frequency, Duration)
  23. NEXT
  24. PRINT "Well, close--but something's still not quite right."
  25.  
  26. CALL Pause(40)
  27.  
  28. RESTORE
  29. PRINT "I've got it: we need some vibrato!  How's this?"
  30. FOR X = 1 TO 10
  31.     READ Frequency, Duration
  32.     FOR Y = 1 TO Duration \ 2
  33.         CALL BSound(Frequency + 10, 1)
  34.         CALL BSound(Frequency - 10, 1)
  35.     NEXT
  36. NEXT
  37. PRINT "That's the ticket!"
  38.  
  39. DATA 523, 16, 1047, 16, 988, 8, 784, 4, 880, 4, 988, 8, 1047, 8
  40. DATA 523, 16, 880, 16, 784, 24
  41.  
  42.